package com.hsnn.medstgmini.trading.pur.model;

/**
 * @category 退货单状态
 * @author 蔡春龙
 * @date 2015年7月16日
 */
public enum ReturnStatus {

	submit(1, "已提交"), agree(2, "确认退货"), reject(3, "拒绝退货");

	private int key;
	private String value;

	private ReturnStatus(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public static String getName(int key) {
		for (ReturnStatus ot : ReturnStatus.values()) {
			if (ot.key == key) {
				return ot.value;
			}
		}
		return "";
	}

	public static ReturnStatus getOrderType(int key) {
		for (ReturnStatus ot : ReturnStatus.values()) {
			if (ot.key == key) {
				return ot;
			}
		}
		return null;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

}
